import { defHttp } from '/@/utils/http/axios';

enum Api {
  list = '/sys/log/list',
  deleteBatch = '/sys/log/deleteBatch',
}

/**
 * 查询日志列表
 * @param params
 */
export const getLogList = (params) => {
  return defHttp.get({ url: Api.list, params });
};


/**
 * 清空所有日志数据
 * @param handleSuccess
 */
export const clearAll = (handleSuccess) => {
  return defHttp.delete({url: Api.deleteBatch, data: {ids:'allclear'}}, {joinParamsToUrl: true}).then(() => {
    handleSuccess();
  });
}
